<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <title><g:message code="staff.nav.show"/></title>
</head>
<body>
<div class="nav">
    <span class="menuButton"><g:link class="list" action="list"><g:message code="staff.nav.list"/></g:link></span>
    <span class="menuButton"><g:link class="create" action="create"><g:message code="staff.nav.create"/></g:link></span>
</div>
<div class="body">
    <h1><g:message code="staff.nav.show"/></h1>
    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
        <table>
            <tbody>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.id"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'id')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.name"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'name')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.phone"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'handPhone')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.home.phone"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'homePhone')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.street"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'street')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.postal"/>:</td>

                <td valign="top" class="value">${fieldValue(bean: staffInstance, field: 'postalCode')}</td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.group"/>:</td>

                <td valign="top" class="value"><g:link controller="staffGroup" action="show" id="${staffInstance?.group?.id}">${staffInstance?.group?.encodeAsHTML()}</g:link></td>

            </tr>

            <tr class="prop">
                <td valign="top" class="name"><g:message code="staff.table.commissionPolicyGroup"/>:</td>

                <td valign="top" class="value"><g:link controller="commissionPolicyGroup" action="show" id="${staffInstance?.commissionPolicyGroup?.id}">${staffInstance?.commissionPolicyGroup?.encodeAsHTML()}</g:link></td>

            </tr>

            <g:if test="${authUser != null}">
                <tr class="prop">
                    <td valign="top" class="name">${message(code: 'customer.table.authuser')}:</td>
                    <td valign="top" class="value"><g:link controller="authUser" action="show" id="${authUser?.id}">${authUser?.encodeAsHTML()}</g:link></td>
                </tr>
            </g:if>

            </tbody>
        </table>
    </div>
    <div class="buttons">
        <g:form>
            <input type="hidden" name="id" value="${staffInstance?.id}"/>
            <span class="button"><g:actionSubmit class="edit" value="${message(code: 'staff.nav.edit')}" action="edit"/></span>
            <g:if test="${authUser == null}">
                <span class="button"><g:link class="edit" params="['person.id':staffInstance?.id, 'authority.id':AuthRole.findByAuthority(staffInstance?.group?.role).id]" controller="register" action="index">${message(code: 'common.button.register')}</g:link></span>
            </g:if>
            <span class="button"><g:actionSubmit class="delete" id="${staffInstance?.id}" onclick="return confirm('${message(code:'common.delete.confirm')}');" value="Delete"/></span>
        </g:form>
    </div>
</div>
</body>
</html>
